package com.aratek.huwai.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * @Author 姜寄羽
 * 评分表
 * @Date 2018/1/22 17:21
 */
@Entity
@Table(name = "SCORE")
public class ScoreEntity implements Serializable {

    private Integer id;

    @NotNull(message = "请选择菜品名")
    private Integer dishId;

    @NotNull
    @Min(value = 1,message = "裁判桌号必需大于等于1")
    @Max(value = 15,message = "裁判桌号必需小于15")
    private Integer raterTable;

    @Min(value = 0,message = "分数必需大于等于0")
    @Max(value = 10,message = "分数必需小于等于10")
    private Integer taste;

    @Min(value = 0,message = "分数必需大于等于0")
    @Max(value = 10,message = "分数必需小于等于10")
    private Integer exterior;

    @Min(value = 0,message = "分数必需大于等于0")
    @Max(value = 10,message = "分数必需小于等于10")
    private Integer originality;

    @Id
    @Column(length = 30)
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    @Column(length = 1024,nullable = false)
    public Integer getDishId() {
        return dishId;
    }

    public void setDishId(Integer dishId) {
        this.dishId = dishId;
    }

    @Column
    public Integer getRaterTable() {
        return raterTable;
    }

    public void setRaterTable(Integer raterTable) {
        this.raterTable = raterTable;
    }

    @Column
    public Integer getTaste() {
        return taste;
    }

    public void setTaste(Integer taste) {
        this.taste = taste;
    }

    @Column
    public Integer getExterior() {
        return exterior;
    }

    public void setExterior(Integer exterior) {
        this.exterior = exterior;
    }

    @Column
    public Integer getOriginality() {
        return originality;
    }

    public void setOriginality(Integer originality) {
        this.originality = originality;
    }
}
